<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
        >


<ui:component>

    <rich:simpleTogglePanel switchType="client"
                            label="Creation Scripts"
                            opened="false"
                            style="width:50%">
        <h:form>
            <h:panelGrid columns="1">
                <h:outputText value="#{resources.warningDBScriptText}" style="color:red"/>
                <h:selectBooleanCheckbox value="#{adminPageBean.doCreationScript}">
                    <h:outputText value="#{resources.recreateDataBaseText}" style="color:red"/>
                </h:selectBooleanCheckbox>
                <h:selectBooleanCheckbox value="#{adminPageBean.doPopulationScript}">
                    <h:outputText value="#{resources.repopulateDataBaseText}" style="color:red"/>
                </h:selectBooleanCheckbox>
                <a4j:commandButton value="#{resources.executeLabel}" action="#{admin.executeScript}"/>
            </h:panelGrid>
        </h:form>
    </rich:simpleTogglePanel>
    <rich:simpleTogglePanel switchType="client"
                            label="#{resources.backupScriptsLabel}"
                            opened="false"
                            style="width:50%">
        <h:form>
            <h:panelGrid columns="1">
                <h:inputText value="#{adminPageBean.backupName}" required="true"
                             requiredMessage="Backup must have name">
                    <h:outputLabel value="#{resources.nameOfBackUpLabel}"/>
                </h:inputText>
                <h:selectBooleanCheckbox value="#{adminPageBean.doBackup}">
                    <h:outputLabel value="#{resources.backupDataBaseLabel}" style="color:red"/>
                </h:selectBooleanCheckbox>
                <h:selectBooleanCheckbox value="#{adminPageBean.doPopulationScript}">
                    <h:outputLabel value="#{resources.restoreDataBaseLabel}" style="color:red"/>
                </h:selectBooleanCheckbox>
                <a4j:commandButton value="#{resources.executeLabel}" action="#{admin.executeBackupRestore}"/>
            </h:panelGrid>
        </h:form>
    </rich:simpleTogglePanel>
</ui:component>


</html>